home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / PInterfaces / ADSPSecure.p < prev    next >
Encoding:
Text File  |  1995-07-06  |  4.5 KB  |  157 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        ADSPSecure.p
  3.  
  4.      Contains:    Secure AppleTalk Data Stream Protocol Interfaces.
  5.  
  6.      Version:    Technology:    AOCE Toolbox 1.02
  7.                  Package:    Universal Interfaces 2.1 in “MPW Latest” on ETO #18
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. }
  19.  
  20. {$IFC UNDEFINED UsingIncludes}
  21. {$SETC UsingIncludes := 0}
  22. {$ENDC}
  23.  
  24. {$IFC NOT UsingIncludes}
  25.  UNIT ADSPSecure;
  26.  INTERFACE
  27. {$ENDC}
  28.  
  29. {$IFC UNDEFINED __ADSPSECURE__}
  30. {$SETC __ADSPSECURE__ := 1}
  31.  
  32. {$I+}
  33. {$SETC ADSPSecureIncludes := UsingIncludes}
  34. {$SETC UsingIncludes := 1}
  35.  
  36.  
  37. {$IFC UNDEFINED __EVENTS__}
  38. {$I Events.p}
  39. {$ENDC}
  40. {    Types.p                                                        }
  41. {        ConditionalMacros.p                                        }
  42. {    Quickdraw.p                                                    }
  43. {        MixedMode.p                                                }
  44. {        QuickdrawText.p                                            }
  45. {    OSUtils.p                                                    }
  46. {        Memory.p                                                }
  47.  
  48. {$IFC UNDEFINED __NOTIFICATION__}
  49. {$I Notification.p}
  50. {$ENDC}
  51.  
  52. {$IFC UNDEFINED __APPLEEVENTS__}
  53. {$I AppleEvents.p}
  54. {$ENDC}
  55. {    Errors.p                                                    }
  56. {    EPPC.p                                                        }
  57. {        AppleTalk.p                                                }
  58. {        Files.p                                                    }
  59. {            Finder.p                                            }
  60. {        PPCToolbox.p                                            }
  61. {        Processes.p                                                }
  62.  
  63. {$IFC UNDEFINED __TYPES__}
  64. {$I Types.p}
  65. {$ENDC}
  66.  
  67. {$IFC UNDEFINED __ADSP__}
  68. {$I ADSP.p}
  69. {$ENDC}
  70.  
  71. {$IFC UNDEFINED __FILES__}
  72. {$I Files.p}
  73. {$ENDC}
  74.  
  75. {$IFC UNDEFINED __OCE__}
  76. {$I OCE.p}
  77. {$ENDC}
  78. {    Aliases.p                                                    }
  79. {    Script.p                                                    }
  80. {        IntlResources.p                                            }
  81.  
  82. {$IFC UNDEFINED __OCEAUTHDIR__}
  83. {$I OCEAuthDir.p}
  84. {$ENDC}
  85.  
  86. {$PUSH}
  87. {$ALIGN MAC68K}
  88. {$LibExport+}
  89.  
  90. CONST
  91.     sdspOpen                    = 229;
  92.  
  93. {
  94. For secure connections, the eom field of ioParams contains two single-bit flags
  95. (instead of a zero/non-zero byte). They are an encrypt flag (see below), and an
  96. eom flag.  All other bits in that field should be zero.
  97.  
  98. To write an encrypted message, you must set an encrypt bit in the eom field of
  99. the ioParams of your write call. Note: this flag is only checked on the first
  100. write of a message (the first write on a connection, or the first write following
  101. a write with eom set.
  102. }
  103.     dspEOMBit                    = 0;                            { set if EOM at end of write }
  104.     dspEncryptBit                = 1;                            { set to encrypt message }
  105.  
  106.     dspEOMMask                    = 1 * (2**(dspEOMBit));
  107.     dspEncryptMask                = 1 * (2**(dspEncryptBit));
  108.  
  109.     sdspWorkSize                = 2048;
  110.  
  111.  
  112. TYPE
  113.     TRSecureParams = RECORD
  114.         localCID:                INTEGER;                                { local connection id }
  115.         remoteCID:                INTEGER;                                { remote connection id }
  116.         remoteAddress:            AddrBlock;                                { address of remote end }
  117.         filterAddress:            AddrBlock;                                { address filter }
  118.         sendSeq:                LONGINT;                                { local send sequence number }
  119.         sendWindow:                INTEGER;                                { send window size }
  120.         recvSeq:                LONGINT;                                { receive sequence number }
  121.         attnSendSeq:            LONGINT;                                { attention send sequence number }
  122.         attnRecvSeq:            LONGINT;                                { attention receive sequence number }
  123.         ocMode:                    SInt8; (* unsigned char *)                { open connection mode }
  124.         ocInterval:                SInt8; (* unsigned char *)                { open connection request retry interval }
  125.         ocMaximum:                SInt8; (* unsigned char *)                { open connection request retry maximum }
  126.         secure:                    BOOLEAN;                                {  --> TRUE if session was authenticated }
  127.         sessionKey:                AuthKeyPtr;                                { <--> encryption key for session }
  128.         credentialsSize:        LONGINT;                                {  --> length of credentials }
  129.         credentials:            Ptr;                                    {  --> pointer to credentials }
  130.         workspace:                Ptr;                                    {  --> pointer to workspace for connection
  131.                                            align on even boundary and length = sdspWorkSize }
  132.         recipient:                AuthIdentity;                            {  --> identity of recipient (or initiator if active mode }
  133.         issueTime:                UTCTime;                                {  --> when credentials were issued }
  134.         expiry:                    UTCTime;                                {  --> when credentials expiry }
  135.         initiator:                RecordIDPtr;                            { <--  RecordID of initiator returned here.
  136.                                             Must give appropriate Buffer to hold RecordID
  137.                                             (Only for passive or accept mode) }
  138.         hasIntermediary:        BOOLEAN;                                { <--  will be set if credentials has an intermediary }
  139.         filler1:                BOOLEAN;
  140.         intermediary:            RecordIDPtr;                            { <--  RecordID of intermediary returned here.
  141.                                             (If intermediary is found in credentials
  142.                                             Must give appropriate Buffer to hold RecordID
  143.                                             (Only for passive or accept mode) }
  144.     END;
  145.  
  146.  
  147. {$ALIGN RESET}
  148. {$POP}
  149.  
  150. {$SETC UsingIncludes := ADSPSecureIncludes}
  151.  
  152. {$ENDC} {__ADSPSECURE__}
  153.  
  154. {$IFC NOT UsingIncludes}
  155.  END.
  156. {$ENDC}
  157.